/*
 * @Date: 2023-05-02 23:08:57
 * @LastEditors: jacky02
 * @LastEditTime: 2023-05-03 09:30:12
 */
import { Navigate } from "react-router-dom";
import { lazy, Suspense } from "react";
const About = lazy(() => import("@/Pages/About"));
const G2 = lazy(() => import("@/Pages/G2"));
const G2Plot = lazy(() => import("@/Pages/G2Plot"));
const S2 = lazy(() => import("@/Pages/S2"));
const G6 = lazy(() => import("@/Pages/G6"));
const Graphin = lazy(() => import("@/Pages/Graphin"));
const X6 = lazy(() => import("@/Pages/X6"));

const routes = [
  {
    path: "/",
    element: <Navigate to="/About" replace />,
  },
  {
    path: "/About",
    element: (
      <Suspense>
        <About />
      </Suspense>
    ),
  },
  {
    path: "/nomal/G2",
    element: (
      <Suspense>
        <G2 />
      </Suspense>
    ),
  },
  {
    path: "/nomal/G2Plot",
    element: (
      <Suspense>
        <G2Plot />
      </Suspense>
    ),
  },
  {
    path: "/nomal/S2",
    element: (
      <Suspense>
        <S2 />
      </Suspense>
    ),
  },
  {
    path: "/relate/G6",
    element: (
      <Suspense>
        <G6 />
      </Suspense>
    ),
  },
  {
    path: "/relate/Graphin",
    element: (
      <Suspense>
        <Graphin />
      </Suspense>
    ),
  },
  {
    path: "/relate/X6",
    element: (
      <Suspense>
        <X6 />
      </Suspense>
    ),
  },
];

export default routes;
